import { _decorator, Animation,AnimationClip, Component, Node, Sprite, SpriteFrame } from 'cc';
import { FSM_PARAMS_TYPE_ENUM } from '../Enums';
import State from './State';
import { StateMachine } from './StateMachine';


const { ccclass, property } = _decorator;



export abstract class SubStateMachine {
    private _currentState: State = null;
    stateMachines: Map<string,State> = new Map();// 状态机列表

    constructor(public fsm: StateMachine) {
        
    }


    get currentState(): State {
        return this._currentState;
    }
    set currentState(newState: State) {
        this._currentState = newState;
        this._currentState.run();

    }

    abstract run():void;
}


